function exp_length_multiTime(ExpGroup)
adata_dir='\\argon.fmi.ch\keller.g\AData\';
exp_ord={};
exp_len=[];
for fnd=1:length(ExpGroup)
    display(['Exp: ' num2str(ExpGroup(fnd)) ' *****************************']);
    [adata_file,mouse_id,userID]=find_adata_file(ExpGroup(fnd),adata_dir);
    orig=load([adata_dir userID '\' mouse_id '\' adata_file],'nbr_frames');
    if length(orig.nbr_frames)>5
        order=[];
        for xnd=1:length(orig.nbr_frames)
            if orig.nbr_frames(xnd)==20000
                if xnd==length(orig.nbr_frames)
                    order(xnd)=3;
                else
                    order(xnd)=1;
                end
            else
                order(xnd)=2;
            end
        end
    else
        order=[1 2 1 2 3];
    end
    a=1:length(order);
    order(max(a(order==2))+1:end)=3;
    exp_ord{fnd}=order;
    exp_len(fnd)=sum(orig.nbr_frames);
end
rect_cor={};
col_arr={};
for jnd=1:length(exp_ord)
    cur_cor=0;
    for ind=1:length(exp_ord{jnd})
        rect_cor{jnd}(1,ind)=cur_cor;
        if exp_ord{jnd}(ind)==1
            cur_cor=cur_cor+20000;
            cur_len=20000;
            cur_col=[0.5 0.5 0.5];
        elseif exp_ord{jnd}(ind)==2
            cur_cor=cur_cor+20500;
            cur_len=20500;
            cur_col=[0 1 0];
        elseif exp_ord{jnd}(ind)==3
            cur_cor=cur_cor+20000;
            cur_len=20000;
            cur_col=[0 0 0];
        end
        rect_cor{jnd}(2,ind)=cur_len;
        col_arr{jnd}(ind,:)=cur_col;
    end
end
figure;
xlim([0 max(exp_len)+10000])
ylim([0 16])
set(gca,'XTick',[0:40000:max(exp_len)])
set(gca,'XTickLabel',[0:40000:max(exp_len)])
for hnd=1:length(rect_cor)
    for knd=1:length(rect_cor{hnd})
        rectangle('position',[rect_cor{hnd}(1,knd) 14-(2*(hnd-1)) rect_cor{hnd}(2,knd) 1],'FaceColor',col_arr{hnd}(knd,:))
    end
end